Internalize 5 dag.hpp functions with no external callers#39
Merged
Conversation
Remove from public header (no callers outside dag.cpp): - validate_node_id: only used by add_edge internally - add_phi_node, get_phi_node, resolve_phi_node: phi-node lifecycle is entirely internal to the DAG - leaf_nodes: no production callers (test-only) Also removes leaf_nodes test sections since the function is now internal. Swaps get_phi_node overload order so const precedes mutable (needed without the header forward-declaring both). Public API: 57 → 52 functions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove 5 functions from the public dag.hpp header — none had callers outside dag.cpp:
validate_node_idadd_edgewithin dag.cppadd_phi_nodeget_phi_node(×2)resolve_phi_nodecalls itresolve_phi_nodeleaf_nodesAlso removes
leaf_nodestest sections (testing an internal function) and swapsget_phi_nodeoverload order so the const version precedes the mutable one (needed without the header forward-declaring both).Public API: 57 → 52 functions. Net −39 lines.
Test plan
clang-formatclean🤖 Generated with Claude Code